<?php

/**
 * OperadoresEgresos filter form.
 *
 * @package    cronos-doctrine
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class OperadoresEgresosFormFilter extends BaseOperadoresEgresosFormFilter
{
  public function configure()
  {
      
      
      $this->widgetSchema['fecha'] = new sfWidgetFormInput(array(), array('size' => 15, 'id' => 'fecha' ,'readonly'=>'readonly'));
      
      
        $this->widgetSchema['operador_id'] = new sfWidgetFormDoctrineChoice(array(
         'multiple' => false, 
         'model' => 'sfGuardUser',
         'query' => Doctrine_Query::create()->select('sf.id,sf.username')
                                    ->from('sfGuardUser sf')
                                    ->leftJoin('sf.sfGuardUserPermission s')
                                    ->where('sf.is_active = 1')
                                    ->addWhere('sf.empresa_id=?', sfContext::getInstance()->getUser()->getAttribute('agente_user_empresa_id'))
                                    ->addWhere('s.permission_id=7')
                                    ->addWhere('s.permission_id=7')
                                    ->orderBy('sf.username asc'),
         'expanded' => false),array('id' => 'operador_id'));
        
      
  }
}
